<@_modelList parentId=parentId hasChild=hasChild pageIndex=pageNum count=numPerPage>
<#if parentId?has_content>
	<@_model id=parentId>
		<#assign parent=object/>
	</@_model>
</#if>
<div class="pageHeader">
	<form id="pagerForm" onsubmit="return navTabSearch(this);" method="post">
		<#include "../include_page/paramters.html"/>
		<div class="searchBar">
			<ul class="searchContent">
			<#if parent?has_content>
				<li>
					<label>父模型：</label>${parent.name}
				</li>
			</#if>
			</ul>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<#if parent?has_content>
				<li><a class="icon" href="cmsModel/list?parentId=${(parent.parentId)!}" target="navTab" rel="sysMoudle/list" title="模型管理"><span>返回上一级</span></a></li>
				<li class="line">line</li>
			</#if>
			<li><a class="add" href="cmsModel/add.html?parentId=${(parent.id)!}" target="navTab" rel="cmsModel/add"><span>添加模型</span></a></li>
			<li><a class="edit" href="cmsModel/add.html?id={sid}" target="navTab" rel="cmsModel/edit"><span>修改模型</span></a></li>
			<@_sysAuthorized roleIds=admin.roles url='cmsModel/delete'>
				<li><a class="delete" href="cmsModel/delete.do?id={sid}" title="确定要删除这条记录么?" target="ajaxTodo"><span>删除</span></a></li>
			</@_sysAuthorized>
		</ul>
	</div>
	<table class="list" width="100%" layoutH="92">
		<thead>
			<tr>
				<th width="30">ID</th>
				<th>模型名称</th>
				<th>内容页面模板路径</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<#list page.list as a>
			<tr target="sid" rel="${a.id}">
				<td>${a.id!}</td>
				<td>${a.name!}</td>
				<td>${a.templatePath!}</td>
				<td>
					<#if a.hasChild>
						<a href="cmsModel/list.html?parentId=${a.id}" target="navTab" rel="cmsModel/list">子模型管理</a>
					</#if>
				</td>
			</tr>
			</#list>
		</tbody>
	</table>
	<#include "../include_page/page.html"/>
</div>
</@_modelList>